Fixed callback to end