Starting to work, initial bug fix