Fixes of IDEAS-21& IDEAS-23

http://jira.xwiki.org/browse/IDEAS-21?jql=project%20%3D%20IDEAS%20AND%20resolution%20%3D%20Unresolved%20AND%20priority%20%3D%20Major%20ORDER%20BY%20key%20DESC

http://jira.xwiki.org/browse/IDEAS-23?jql=project%20%3D%20IDEAS%20AND%20resolution%20%3D%20Unresolved%20AND%20priority%20%3D%20Major%20ORDER%20BY%20key%20DESC