Fixed according to @destil's instructions