Fixed issues with uploading agent via web console