Fixed wrong method calls
Updated version