Patch for the above problems. It cam be aplied on the latest revision (376)