Fixed attribute affects behaviour and cleaned up onConnection method