handling redirect and bug prev commit