some fixes for amazon branch