Fixed an issue with draw detection