Fixes based on stomlinson and seanmonstar feedback