Fixed Sadegh's issues