handled some edget cases