fixed statements being leaked