Better handling of things. Thx to @thinkofdeath