Regarding the g.region problem. Some hidden characters was the cause of the error. I'm not sure how they got in there, but removing them works. Could be a bug with XCode. Problem solved. David