Fixed more errors when running with the bundle