Fixes the deploy option + some improvements