Fixed compilation issue and broken test