Final code to get back prop working correctly.