Add before inflate hook