Final bug fixes before beta release