Fixed painter segfault. Does not paint in right spot.