[PATCH] Fixed a number of bugs in the PHY Layer