Fixed registration of location listeners, fixes #40