Modified if statements and removed error int

Signed-off-by: Your Name <altabraydon@gmail.com>