Fixed problems with Pan API