Removed bug where grunt could end up in an infinite loop