Fixed staging bugs