fixes lil bug on end statement