Solved few bugs in compile script