Fixed bug in porduction mode