Added fixes from vascoosx