2 Bugs and 1 Enhancement has been fixed

2 Bugs and 1 Enhancement has been fixed. Please commit this to master.