fix format warning
fixed out-of-screen drawing