diff --git a/src/Runtime.php b/src/Runtime.php
index 74d0c6b5..48c3b6ce 100644
--- a/src/Runtime.php
+++ b/src/Runtime.php
@@ -151,7 +151,7 @@ public static function lo($cx, $v) {
public static function v($cx, $in, $base, $path, $args = null) {
$count = count($cx['scopes']);
$plen = count($path);
- while ($base) {
+ while ($base !== null) {
$v = $base;
foreach ($path as $i => $name) {
if (is_array($v)) {
diff --git a/tests/regressionTest.php b/tests/regressionTest.php
index 59a0bc44..7b0069a5 100644
--- a/tests/regressionTest.php
+++ b/tests/regressionTest.php
@@ -1553,6 +1553,18 @@ public function issueProvider()
'expected' => 'ab'
),
+ Array(
+ 'id' => 305,
+ 'template' => '{{#foo}}{{foo}}{{/foo}}',
+ 'options' => Array(
+ 'flags' => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_MUSTACHELOOKUP,
+ ),
+ 'data' => Array(
+ 'foo' => '0',
+ ),
+ 'expected' => '0'
+ ),
+
Array(
'template' => '{{#each . as |v k|}}#{{k}}{{/each}}',
'data' => Array('a' => Array(), 'c' => Array()),