fixed pat errors