Fix as_absolute to work correctly