Fixed bugs, security fix