fixed checks and formatted strings