LCOM4 bug fixes

Bug fixes of bugs found testing the program on spring.net