more bug fixes

firstgid / lastgid to draw works better