Fix coordinate transform seg fault