Fixed security and performance issiues