Fixing bugs with new layout