Merge pull request #15 from darwink/master

Fix some bugs and merge latest code
fix bug for reading date field from db

"wasNull" has to be called after calling "get" function