fixed drawing problem