revises server captures nullPointerException and increases test coverage