more bug fixes to linear and relative layout