Fixed error and notice by @Owain94