Variable DEPTH must be deleted before ADD_POINTS_REFSYSTEM() is being called :(