Fixed function for draw detection