Bugfix for remote
Tests for remote