changed shift by Pbuf to unify the casting, now runs smoothly for arbitrary Estep