Fixed error in production mode and sending notifications