Fixed if-shell stuff