Fixed off by one error
Added animation update on style change and added test