Fixed formatting error
Fixed various problems with the WC related code