Made margin and border size parsing more robust