Some fixes

Haven't fixed the crashing problem yet.
Merge pull request #4 from arjungopisetty/master

Some fixes