fixed script and compiling