fixing fromwhere bug