fixed b0rked indentation, and stupid hasFrame which apparently makes it crash hard as hell..