Prevented code button from displaying repeatedly