fix potential security problems in previous commit.
fixed indentation