Fixed a undefined reference error
Moved canvas setup to JP.SetResolution() to avoid null object issues
Need this too for the previous commit