Linley bug fixes