Exception: Trying to call method handle on a non-object