Fixed homepage bugs

- single should be used instead of first - doesn't create new cursor
- set $cp to created value