Buggy js compile