fix subroutine execution