"Every other time an error occurs."

When reporting an error please state what the error is, including the text of the error.

There are some things possibly wrong, but let's start with what exactly is the error you are getting.