Merge castolpe's update