bugfix: set_handle_invalid should take handle as reference
Fixed pedantic warnings