fixed peripheral checking