Overrode load and unload, but cant figure out error