Bugfix to constructor for objects being passed as arg