fixed a bug where a coordinate would be null