last functional bugs fixed