Fixed some bugs on linux. Added some test images.