fixed a few issues and added hidden fields