Bug fixes in deploycommand.php