Fixed reported bugs

Fixed PRD-1213 and PRD-1232. Implemented minor changes according to given feedback.