Merge pull request #7 from MichaelSchoebel/fpc-linux

Fix severe memory leak on Linux, and some other minor stuff