fix for binary phase code