Wait until process is finished
Create helper function for shifting
Fix vector exception