Fixed malfunctioning when redeploying