Added back more code, now it doesn't throw the weird exception