fixed layout bug occluding err msg. Added a sample