view: fixed rotation problem
controller: fixed db duplicate entries