Fixed "Illegal Invocation" error