Fixed bugs
Added reset port