bug fixed: wrong redirection in calculator