fix for critical error: unnecessary instance creation