Fixed issue with singleton check