Fixed small bug in writing surfaces