Kerala court grants bail