fixed problem with MAC, small fixes