Fixed security bugs