Fixed bug in staging