Fixed a small bugs, added VERSION compile constant