Fixed clearing bug. Need to clear cache before clearing canvas