Fixing improper input syntax and failing bounds check
Fixing improper input syntax and failing bounds check

(cherry picked from commit 87314c1c5e69035fefa638de8e237e4ce09788e9)

reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin