fix for return value of margin