fixed bugs in staging branch