Fixing bugs for grunt 0.4.0rc2

Hi,

Please check if this makes sense to you.

Thanks