Fix tests and grunt build