fixing classes in next/previous view layer