Fixed bugs that failed the build