fixed some minor bugs (behavior upon element being disabled etc.)