widgets problem fixed, code tweaks