removed some unnecessary logic that was used during debugging and fixed
a possible method argument typing error.