fixed issues based on hangout discussion