fix issue with drawing outside canvas graph