fixed a bug with specifying custom coordinate location when using add_layer().