fixed issue where buttons were deleted