bug fix: threw an error on slide change