Added missing closing if in build script