Fixed some security holes.

Closes #3