extend from right template fix