[FIX] Bugfix on create_instance function