Bugfixes

Changed some methods to match te new args order
Fixed ClassCastException